import HTTP from '../util/http.js'
const app = getApp()
export default class LikeModel extends HTTP {
  like(behavior, artID, category) {
    let url = behavior=="like" ? "like" : "cancel"
    this.request({
      url: app.globalData.url.classic[url],
      method: "POST",
      data: {
        art_id: artID,
        type: category
      }
    })
  }

  getClassicLikeStatus(artID, category, sCallback) {
    this.request({
      url: app.globalData.url.classic.likeStatus(artID, category),
      success: sCallback
    })
  }
} 